import React, {
	Component
} from 'react';
import {
	observer
} from 'mobx-react';
import {
	List,
	Tools,
	Icon,
	Avatar,
} from "weaver-mobile";
const getLabel = Tools.getLabel;
const { FormItem } = List;

@observer
export default class Portrait extends Component {
	render() {
		const {
			store
		} = this.props, {
			portraitUrl,
			portraitName,
			isProtraitUrlBase64,
			basicOtherParams,
		} = store;

		return (
			<FormItem 
				key={1} 
				line
				label={getLabel(511089,'头像')}
				wrap="nowrap"
				extra={[<Icon key="right" type="right" />]}
				content={
					isProtraitUrlBase64 ? 
					<img src={portraitUrl} className='portraitImg' /> : 
					<Avatar userId={basicOtherParams.id} />
				}
			/>
		);
	}
}